<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>vue 列表过渡</title>
    <script src="./vue.js"></script>
    <style>
        .v-enter, .v-leave-to{
            opacity: 0;
        }
        .v-enter-active, .v-leave-active{
            transform: opacity 1s;
        }
    </style>
</head>
<body>
    <div id="app">
        <transition-group>
                <div v-for="item  of list" :key="item.id">{{item.title}}</div>
        </transition-group>
        
        <button @click="btn">btn</button>
    </div>
    <script>
        var count = 0;
        var vm = new Vue({
            el: '#app',
            data: {
              list: []  
            },
            //方法
            methods:{
                btn: function(){
                    this.list.push({
                        id: count++,
                        title: 'pledge'
                    })
                }
            },
            //组件
            components: {
                
            },
            //计算属性
            computed:{
               
            }


        })
    </script>
</body>
</html>